<!DOCTYPE html>
<html lang="cn-zh">

<head>
  
  <meta charset="utf-8">



<meta name="viewport" content="width=device-width, initial-scale=1.0">


  
    <meta name="description" content="如图UIView的宽度为8，高度为8，圆角设置为宽高的一半 第二个属性可以不用设置 layer.masksToBounds">
  


<meta name="color-scheme" content="light dark">







<meta name="generator" content="Hugo 0.111.2">
  <title>Storyboard下设置UIView圆角 | 通通不同-博客</title>
  <link rel="canonical" href="https://codebeautiful.gitee.io/post/uiview_cornerradius_setting/">


  








  
    
  
  
  <link rel="stylesheet" href="/css/base.min.4f231885947d13c748c815d93da49f07ab89afb67629f9970b7c054610e88e0b.css" integrity="sha256-TyMYhZR9E8dIyBXZPaSfB6uJr7Z2KfmXC3wFRhDojgs=" crossorigin="anonymous">



</head>

<body>
  <nav class="u-background">
  <div class="u-wrapper">
    <ul class="Banner">
      <li class="Banner-item Banner-item--title">
        <h1 class="Banner-heading">
          <a class="Banner-link u-clickable" href="/">通通不同-博客</a>
        </h1>
      </li>
      
        <li class="Banner-item">
          <a class="Banner-link u-clickable" href="/post/">全部</a>
        </li>
      
        <li class="Banner-item">
          <a class="Banner-link u-clickable" href="/categories/">分类</a>
        </li>
      
        <li class="Banner-item">
          <a class="Banner-link u-clickable" href="/tags/">标签</a>
        </li>
      
        <li class="Banner-item">
          <a class="Banner-link u-clickable" href="/about/">关于</a>
        </li>
      
    </ul>
  </div>
</nav>

  <main>
    <div class="u-wrapper">
      <div class="u-padding">
        

  <article>
    <header class="Heading">
  <h2 class="Heading-title">
    <a class="Heading-link u-clickable" href="/post/uiview_cornerradius_setting/" rel="bookmark">Storyboard下设置UIView圆角</a>
  </h2>
  
    <time datetime="2023-03-31T16:08:53&#43;08:00">31 March, 2023</time>
  
</header>
    <ul>
<li>如图UIView的宽度为8，高度为8，圆角设置为宽高的一半
<img src="/images/UIView_cornerRadius.png" alt="UIView设置圆角"></li>
</ul>
<blockquote>
<p>第二个属性可以不用设置  layer.masksToBounds</p>
</blockquote>

    


  

  

  





    
  

  </article>


      </div>
    </div>
  </main>
  
  <footer class="Footer">
    <div class="u-wrapper">
      <div class="u-padding">
        开发的乐趣在于相通而不同
      </div>
    </div>
  </footer>


  <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d08a2ad355cb7a065a41be081b43297e";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>

</body>

</html>
